package com.yuju.account.enums;

import com.yuju.account.enums.SettleAccountReturnCodeEnum;

/**
 * 类名：SettleAccountReturnCodeEnum  <br />
 *
 * 功能：
 *
 * @author : jiaokn <br />
 * @Date : 2017年12月5日 上午10:05:58  <br />
 * @version : 1.1 <br />
 */
public enum SettleAccountReturnCodeEnum {

	SETTLEACCOUNT_YJ_SUCCESS("yuju-settleAccount-1001", "收押金成功"),
	SETTLEACCOUNT_YJ_FAILURE("yuju-settleAccount-1002", "收押金失败"),
	SETTLEACCOUNT_SK_SUCCESS("yuju-settleAccount-1003", "收款成功"),
	SETTLEACCOUNT_SK_FAILURE("yuju-settleAccount-1004", "收款失败"),
	SETTLEACCOUNT_TK_SUCCESS("yuju-settleAccount-1005", "退款成功"),
	SETTLEACCOUNT_TK_FAILURE("yuju-settleAccount-1006", "退款失败"),
	SETTLEACCOUNT_FF_SUCCESS("yuju-settleAccount-1007", "加收房费成功"),
	SETTLEACCOUNT_FF_FAILURE("yuju-settleAccount-1008", "加收房费失败"),
	SETTLEACCOUNT_MD_SUCCESS("yuju-settleAccount-1009", "免单成功"),
	SETTLEACCOUNT_MD_FAILURE("yuju-settleAccount-1010", "免单失败"),
	SETTLEACCOUNT_QT_SUCCESS("yuju-settleAccount-1011", "其他收款成功"),
	SETTLEACCOUNT_QT_FAILURE("yuju-settleAccount-1012", "其他收款失败"),
	SETTLEACCOUNT_CT_SUCCESS("yuju-settleAccount-1013", "冲调成功"),
	SETTLEACCOUNT_CT_FAILURE("yuju-settleAccount-1014", "冲调失败"),
	SETTLEACCOUNT_XSD_SUCCESS("yuju-settleAccount-1015", "商品销售成功"),
	SETTLEACCOUNT_XSD_FAILURE("yuju-settleAccount-1016", "商品销售失败"),
	SETTLEACCOUNT_GZ_SUCCESS("yuju-settleAccount-1017", "挂账成功"),
	SETTLEACCOUNT_GZ_FAILURE("yuju-settleAccount-1018", "挂账失败"),
	SETTLEACCOUNT_TF_SUCCESS("yuju-settleAccount-1019", "退房成功"),
	SETTLEACCOUNT_TF_FAILURE("yuju-settleAccount-1020", "退房失败"),
	SETTLEACCOUNT_ZJ_SUCCESS("yuju-settleAccount-1021", "走结成功"),
	SETTLEACCOUNT_ZJ_FAILURE("yuju-settleAccount-1022", "走结失败"),
	SETTLEACCOUNT_LISTQUERY_SUCCESS("yuju-settleAccount-1023", "账务列表查询成功"),
	SETTLEACCOUNT_LISTQUERY_FAILURE("yuju-settleAccount-1024", "账务列表查询失败");
	
	private String code;
	private String desc;
	
	SettleAccountReturnCodeEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDescByCode(String code) {
		for (SettleAccountReturnCodeEnum enume : SettleAccountReturnCodeEnum.values()) {
			if (enume.getCode().equals(code)) {
				return enume.getDesc();
			}
		}
		
		return "未知枚举类型";
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
